<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template circular_slist_algorithms</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../intrusive/reference.html#doxygen.circular__slist__algorithms_8hpp" title="Header &lt;boost/intrusive/circular_slist_algorithms.hpp&gt;">
<link rel="prev" href="structboost_1_1intrusive_1_1circular__list__algorithms_1_1stable__partition__info.html" title="Struct stable_partition_info">
<link rel="next" href="structboost_1_1intrusive_1_1derivation__value__traits.html" title="Struct template derivation_value_traits">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1intrusive_1_1circular__list__algorithms_1_1stable__partition__info.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive/reference.html#doxygen.circular__slist__algorithms_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1intrusive_1_1derivation__value__traits.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template circular_slist_algorithms</span></h2>
<p>boost::intrusive::circular_slist_algorithms</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../intrusive/reference.html#doxygen.circular__slist__algorithms_8hpp" title="Header &lt;boost/intrusive/circular_slist_algorithms.hpp&gt;">boost/intrusive/circular_slist_algorithms.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> NodeTraits<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html" title="Class template circular_slist_algorithms">circular_slist_algorithms</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span><span class="special">::</span><span class="identifier">node</span>           <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ad895f0b01d43a1f109749ee827cefb71"></a><span class="identifier">node</span><span class="special">;</span>          
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span><span class="special">::</span><span class="identifier">node_ptr</span>       <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a907e6b83301217f9aa95ad87d251a588"></a><span class="identifier">node_ptr</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span><span class="special">::</span><span class="identifier">const_node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a6e00781f9dd9512ce9ecc6c14c95fa46"></a><span class="identifier">const_node_ptr</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span>                 <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a627f6d4cb2f19d79e296a65f30a93214"></a><span class="identifier">node_traits</span><span class="special">;</span>   

  <span class="comment">// <a class="link" href="boost_interprocess_header_reference/classboost_1_1interprocess_1_1file__mapping.html#id25-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ac8af1e928a3b98af67ecfb65de6f1ec9"><span class="identifier">init</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a90debf805e6dd86ce65f25aaeae22c63"><span class="identifier">unique</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ad58de57ecba092cb15f7627fa5a1514d"><span class="identifier">inited</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1aa269c4eb263fe10db1739653ef9b090b"><span class="identifier">unlink_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a81558d1adc3787cab3a399fdf063d580"><span class="identifier">unlink_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a9cbdcf7a4494ed36538166e9857b9728"><span class="identifier">link_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a8de9454fbe11da4dbbf33b2fef9c9ac5"><span class="identifier">transfer_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a5dd81ba0d49bfcac123a47a942bd8aae"><span class="identifier">init_header</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ab60608b8f13cc2b182685a03ef3542f5"><span class="identifier">end_node</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a2e1336be018363f76ef90174b2c0b69a"><span class="identifier">is_empty</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ab0135aef544a359a28c39014db559da4"><span class="identifier">is_sentinel</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ac39a977eb825210d7fd41f3bccbb73df"><span class="identifier">set_sentinel</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1af2f35f09a1c183c9fbe858845c5bc221"><span class="identifier">get_previous_node</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ae648bafea9fe642ababba906d1609377"><span class="identifier">get_previous_node</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a8f29fc90ed13a4068399a24c212b13a4"><span class="identifier">get_previous_previous_node</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a597fde0a628de18782ed1539e358c3fe"><span class="identifier">get_previous_previous_node</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a779a717d4db40a90879e39818dfb47c4"><span class="identifier">count</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a4f94ce859a5ba697cf2a0224e00d11fb"><span class="identifier">unlink</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a40ef7193da42a0d3468b660b90fd0df0"><span class="identifier">link_before</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a4170e2f47285a2ab3535f4a000e0a51a"><span class="identifier">swap_nodes</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ace4f2ea180112921c432c4b6c9cdd878"><span class="identifier">reverse</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ae3457d9bf951dcc4743cf20c939dd61b"><span class="identifier">move_backwards</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1adfc05eb87923740db2e02ef3ce9ed4e5"><span class="identifier">move_forward</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a26943f08a306a1c188f860e2eeef4188"><span class="identifier">transfer_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Disposer<span class="special">&gt;</span> 
    <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a7effc85f579dbeb4d537a8f3309d92cc"><span class="identifier">detach_and_dispose</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">Disposer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.17.42.12.3.4"></a><h2>Description</h2>
<p><a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html" title="Class template circular_slist_algorithms">circular_slist_algorithms</a> provides basic algorithms to manipulate nodes forming a circular singly linked list. An empty circular list is formed by a node whose pointer to the next node points to itself.</p>
<p><a class="link" href="classboost_1_1intrusive_1_1circular__slist__algorithms.html" title="Class template circular_slist_algorithms">circular_slist_algorithms</a> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</p>
<p><span class="bold"><strong>Typedefs</strong></span>:</p>
<p><code class="computeroutput">node</code>: The type of the node that forms the circular list</p>
<p><code class="computeroutput">node_ptr</code>: A pointer to a node</p>
<p><code class="computeroutput">const_node_ptr</code>: A pointer to a const node</p>
<p><span class="bold"><strong>Static functions</strong></span>:</p>
<p><code class="computeroutput">static node_ptr get_next(const_node_ptr n);</code></p>
<p><code class="computeroutput">static void set_next(node_ptr n, node_ptr next);</code> </p>
<div class="refsect2">
<a name="id-1.3.17.42.12.3.4.11"></a><h3>
<a name="id25-bb"></a><code class="computeroutput">circular_slist_algorithms</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ac8af1e928a3b98af67ecfb65de6f1ec9"></a><span class="identifier">init</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Constructs an non-used list element, putting the next pointer to null: <code class="computeroutput">NodeTraits::get_next(this_node) == node_ptr()</code></p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a90debf805e6dd86ce65f25aaeae22c63"></a><span class="identifier">unique</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns true is "this_node" is the only node of a circular list: or it's a not inserted node: <code class="computeroutput">return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</code></p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ad58de57ecba092cb15f7627fa5a1514d"></a><span class="identifier">inited</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Returns true is "this_node" has the same state as if it was inited using "init(node_ptr)"</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1aa269c4eb263fe10db1739653ef9b090b"></a><span class="identifier">unlink_after</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: prev_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks the next node of prev_node from the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a81558d1adc3787cab3a399fdf063d580"></a><span class="identifier">unlink_after</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_node<span class="special">,</span> <span class="identifier">node_ptr</span> last_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: prev_node and last_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks the range (prev_node, last_node) from the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a9cbdcf7a4494ed36538166e9857b9728"></a><span class="identifier">link_after</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_node<span class="special">,</span> <span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: prev_node must be a node of a circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Links this_node after prev_node in the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a8de9454fbe11da4dbbf33b2fef9c9ac5"></a><span class="identifier">transfer_after</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">node_ptr</span> b<span class="special">,</span> <span class="identifier">node_ptr</span> e<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: b and e must be nodes of the same circular list or an empty range. and p must be a node of a different circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Removes the nodes from (b, e] range from their circular list and inserts them after p in p's circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a5dd81ba0d49bfcac123a47a942bd8aae"></a><span class="identifier">init_header</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Constructs an empty list, making this_node the only node of the circular list: <code class="computeroutput">NodeTraits::get_next(this_node) == this_node</code>.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ab60608b8f13cc2b182685a03ef3542f5"></a><span class="identifier">end_node</span><span class="special">(</span><span class="identifier">const_node_ptr</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: 'p' is the first node of a list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns a pointer to a node that represents the "end" (one past end) node</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant time.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a2e1336be018363f76ef90174b2c0b69a"></a><span class="identifier">is_empty</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Returns true if this_node_points to an empty list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ab0135aef544a359a28c39014db559da4"></a><span class="identifier">is_sentinel</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Returns true if this_node points to a sentinel node.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ac39a977eb825210d7fd41f3bccbb73df"></a><span class="identifier">set_sentinel</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Marks this node as a "sentinel" node, a special state that is different from "empty", that can be used to mark a special state of the list</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> 
<a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1af2f35f09a1c183c9fbe858845c5bc221"></a><span class="identifier">get_previous_node</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_init_node<span class="special">,</span> <span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node and prev_init_node must be in the same circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the previous node of this_node in the circular list starting. the search from prev_init_node. The first node checked for equality is NodeTraits::get_next(prev_init_node).</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements between prev_init_node and this_node.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ae648bafea9fe642ababba906d1609377"></a><span class="identifier">get_previous_node</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the previous node of this_node in the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements in the circular list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a8f29fc90ed13a4068399a24c212b13a4"></a><span class="identifier">get_previous_previous_node</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the previous node of the previous node of this_node in the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements in the circular list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> 
<a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a597fde0a628de18782ed1539e358c3fe"></a><span class="identifier">get_previous_previous_node</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node and p must be in the same circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the previous node of the previous node of this_node in the circular list starting. the search from p. The first node checked for equality is NodeTraits::get_next((NodeTraits::get_next(p)).</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements in the circular list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a779a717d4db40a90879e39818dfb47c4"></a><span class="identifier">count</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the number of nodes in a circular list. If the circular list is empty, returns 1.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a4f94ce859a5ba697cf2a0224e00d11fb"></a><span class="identifier">unlink</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a circular list, be an empty circular list or be inited.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks the node from the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements in the circular list</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a40ef7193da42a0d3468b660b90fd0df0"></a><span class="identifier">link_before</span><span class="special">(</span><span class="identifier">node_ptr</span> nxt_node<span class="special">,</span> <span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: nxt_node must be a node of a circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Links this_node before nxt_node in the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements in the circular list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a4170e2f47285a2ab3535f4a000e0a51a"></a><span class="identifier">swap_nodes</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">,</span> <span class="identifier">node_ptr</span> other_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node and other_node must be nodes inserted in circular lists or be empty circular lists.</p>
<p><span class="bold"><strong>Effects</strong></span>: Swaps the position of the nodes: this_node is inserted in other_nodes position in the second circular list and the other_node is inserted in this_node's position in the first circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to number of elements of both lists</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ace4f2ea180112921c432c4b6c9cdd878"></a><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Reverses the order of elements in the list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing.</p>
<p><span class="bold"><strong>Complexity</strong></span>: This function is linear to the contained elements. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1ae3457d9bf951dcc4743cf20c939dd61b"></a><span class="identifier">move_backwards</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> n<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Moves the node p n positions towards the end of the list.</p>
<p><span class="bold"><strong>Returns</strong></span>: The previous node of p after the function if there has been any movement, Null if n leads to no movement.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements plus the number moved positions. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1adfc05eb87923740db2e02ef3ce9ed4e5"></a><span class="identifier">move_forward</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> n<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Moves the node p n positions towards the beginning of the list.</p>
<p><span class="bold"><strong>Returns</strong></span>: The previous node of p after the function if there has been any movement, Null if n leads equals to no movement.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements plus the number moved positions. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a26943f08a306a1c188f860e2eeef4188"></a><span class="identifier">transfer_after</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">node_ptr</span> other<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: other must be a list and p must be a node of a different list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Transfers all nodes from other after p in p's list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Disposer<span class="special">&gt;</span> 
  <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> 
  <a name="doxygen.classboost_1_1intrusive_1_1circular__slist__algorithms_1a7effc85f579dbeb4d537a8f3309d92cc"></a><span class="identifier">detach_and_dispose</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">Disposer</span> disposer<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks all nodes reachable from p (but not p) and calls <code class="computeroutput">void disposer::operator()(node_ptr)</code> for every node of the list where p is linked.</p>
<p><span class="bold"><strong>Returns</strong></span>: The number of disposed nodes</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of element of the list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005 Olaf Krzikalla<br>Copyright © 2006-2015 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1intrusive_1_1circular__list__algorithms_1_1stable__partition__info.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive/reference.html#doxygen.circular__slist__algorithms_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1intrusive_1_1derivation__value__traits.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
